﻿<UserControl x:Class="MiniTwitter.Controls.TextViewer"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Name="UserControl">
    <UserControl.Resources>
        <Popup x:Key="ProgressPopup" Placement="MousePoint" PopupAnimation="Fade" AllowsTransparency="True" SnapsToDevicePixels="True" Focusable="True" StaysOpen="False">
            <Border Background="White" BorderThickness="1" BorderBrush="Gray">
                <Grid Margin="10,2,10,2">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <TextBlock Grid.Row="0" Margin="10,5,10,2" HorizontalAlignment="Center">ダウンロード中です...</TextBlock>
                    <ProgressBar Grid.Row="1" Margin="10,2,10,5" IsIndeterminate="True" Width="100" Height="20" HorizontalAlignment="Center"></ProgressBar>
                </Grid>
            </Border>
        </Popup>
        <Popup x:Key="PreviewPopup" Placement="MousePoint" PopupAnimation="Fade" AllowsTransparency="True" SnapsToDevicePixels="True" Focusable="True" StaysOpen="False">
            <Border Background="#90000000" BorderThickness="3" BorderBrush="Gray" CornerRadius="10">
                <Image Source="{Binding Path=Image}" Tag="{Binding Path=Url}" Margin="10" MouseLeftButtonUp="ImageMouseLeftButtonUp" Cursor="Hand" MaxWidth="600" />
            </Border>
        </Popup>
    </UserControl.Resources>
    <TextBlock x:Name="TextBlock" TextWrapping="{Binding ElementName=UserControl, Path=TextWrapping}" TextTrimming="{Binding ElementName=UserControl, Path=TextTrimming}"/>
</UserControl>
